<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>{{site.name}}-{{site.title}}</title>
    {{include './common/meta.html'}}

<body class="bg-f8f8f8">
    <!-- 头部 -->
    {{include './common/header.html'}}

    <!-- 头条文章 -->
    <main class="bg-f2f2f2 pt-10 pb-20 row">
        <div class="main center mt-10 row gap-20">
            <!-- 最新文章 -->
            <article class="article-index">
                <div class="bg-fff pd-15 mb-1 f-14 c-999 radius-6">
                    <i class="ico-20 ico-home pos-r t-3"></i>
                    <a class="" href="/">首页</a> /
                    <a class="c-666" href="/search/{{keywords}}.html">搜索词：<span class="red">{{keywords}}</span></a>
                </div>

                <div class="bg-fff pl-25 pr-25 pb-25 radius-6 list">
                    {{if data.list.length>0}}
                    <ul>
                        {{each data.list}}
                        <li class="row border-dashed pt-20 pb-20">
                            <figure class="row justify-between mt-10 ">
                                {{if $value.img}}
                                <div class="thumb-120 mb-10">
                                    <img class="w-p100" src="{{$value.img}}" alt="{{$value.title}}"
                                        title="{{$value.title}}">
                                </div>
                                {{/if}}
                                <div class="flex-1">
                                    <h3 class="f-18 ellips-2 bold mt-4 c-141414">
                                        <a href="{{$value.path}}/article-{{$value.id}}.html"
                                            title="{{$value.title}}">{{$value.title}}</a>
                                    </h3>
                                    <p class="f-12 c-bfbfbf mb-8">
                                        <i class="ico-20 ico-time pos-r t-4"></i> {{$value.createdAt}}
                                        <i class="ico-20 ico-admin pos-r t-4 ml-4"></i> {{$value.author ||'admin'}}
                                        <i class="ico-20 ico-view pos-r t-5 ml-4"></i> 阅读（{{$value.pv}}）
                                        <!-- <i class="ico-20 ico-zan pos-r t-4 ml-4"></i>点赞（95） -->
                                    </p>
                                    <p class="f-14 ellips-3 c-595959">
                                        <a href="{{$value.path}}/article-{{$value.id}}.html" title="{{$value.title}}">
                                            {{@ $value.description}}[详情]</a>
                                    </p>
                                </div>
                            </figure>
                        </li>
                        {{/each}}
                    </ul>
                    {{else}}
                    <div class="el-empty">
                        <div class="mt-35 mb-35 f-30">
                            <p>寻他千百度，</p>
                            <p>文章一点无！</p>
                        </div>
                        <div class="el-empty__description">
                            <p>禅悦-语录</p>
                        </div>
                    </div>
                    {{/if}}
                </div>

                <div class="page mt-1 bg-fff pd-25 row justify-center  radius-6" id="app">
                    <ul class="overflow-h center" id="page">
                      {{@ pageHtml}}
                    </ul> 
               </div>

            </article>

            <aside class="flex-1">

                <!-- tag标签 -->
                <section class="notices pd-20 mb-20 bg-fff">
                    <h3 class="m-title border-dashed f-16 row justify-between">tag标签</h3>
                    <p class="mt-10">
                        {{each tag}}
                        <a class="el-tag mr-5 mb-5" href="/tags/{{$value.path}}.html"
                            title="{{$value.name}}">{{$value.name}}</a>
                        {{/each}}
                    </p>
                </section>


                <!-- 广告 -->
                <section class="ad mb-20 bg-fff">
                    {{frag.ad.name}}
                    {{@ frag.ad.content}}
                </section>


            </aside>
        </div>
    </main>


    <!-- footer -->
    {{include './common/footer.html'}}
  <!-- 移动端导航 -->
  {{include './common/wap-nav.html'}}
    <div class="api mb-20 mt-20 pd-20 bg-f2f2f2">
        <h1>接口页面--全局数据：</h1>
        <p class="mb-20">site-> {{site}} </p>
        <p class="mb-20">111-->{{site.json.siteSubtitle}}</p>
        <p class="mb-20">nav-> {{nav}} </p>
        <p class="mb-20">category-> {{category}}</p>
        <p class="mb-20">friendlink-> {{friendlink}}</p>
        <p class="mb-20">base_url-> {{base_url}}</p>
        <p class="mb-20">frag--->{{frag}}</p>
        <p class="mb-20">ad--->{{frag.ad}}</p>
        <p class="mb-20">tag--->{{tag}}</p>

        <p class="mb-20">-----------</p>
        <p class="mb-20">position------>{{position}}</p>
        <p class="mb-20">navSub------>{{navSub}}</p>
        <p class="mb-20">list------>{{data}}</p>
    </div>
    {{include './common/js.html'}}
    <!-- <script>
      function toPage(){
        let mumber = decodeURIComponent( location.pathname).match(/\d+/);
        let current = Array.isArray(mumber)?+mumber[0]:1;
        var searchTerm = "";
        var url = decodeURIComponent(location.pathname);
        // 匹配提取搜索词
        var termMatch = url.match(/\/([^/]+)(\/\d+)?\.html?$/);
        if (termMatch) {
            searchTerm = termMatch[1];
        }
        location.href = '/search/'+searchTerm+'/' + v + '.html'
      }
    </script> -->
</body>

</html>